package com.flyme.module.base.provider.service.impl;

import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysUserWork;
import com.flyme.module.base.provider.mapper.SysUserWorkMapper;
import com.flyme.module.base.provider.service.SysUserWorkService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserWorkServiceImpl extends BaseServiceImpl<SysUserWorkMapper, SysUserWork> implements SysUserWorkService {
    @Override
    public List<SysUserWork> selectByUserId(Long userId) {
        return list(q().eq("userId", userId).orderByDesc("createTime"));
    }

    @Override
    public List<SysUserWork> selectWorkyear(Long userId) {

        return list(q().select("workLifeleaval", "workValue").eq("userId", userId).orderByDesc("createTime"));
    }

}
